<?php 
defined('RUN_KATANA') or die('Restricted access');
if($com->getId() > 0)
{
	require_once('controller.php');
	require('auto.js.php');
	
	$buttons[0]['title'] = ucfirst($txt->getWord('my_profile'));
	$buttons[0]['href'] = '/c/'.$com->getComId().'/';
	$buttons[0]['onclick'] = '';
	$buttons[0]['params']['class'] = 'btn btn-default';
	
	$buttons[1]['title'] = ucfirst($txt->getWord('my_ads'));
	$buttons[1]['href'] = '/c/'.$com->getComId().'/?list=ad';
	$buttons[1]['params']['class'] = $buttons[0]['params']['class'];

	$buttons[2]['title'] = ucfirst($txt->getWord('insert').' '.$txt->getWord('new_ad'));
	$buttons[2]['href'] = '/c/'.$com->getComId().'/?edit=ad';
	$buttons[2]['params']['class'] = $buttons[0]['params']['class'];
	
	if($user->getId() > 0)
	{
		$buttons[3]['title'] = ucfirst($txt->getWord('my_favorites'));
		$buttons[3]['href'] = '/c/'.$com->getComId().'/?list=bookmark';
		$buttons[3]['params']['class'] = $buttons[0]['params']['class'];
		/*
		$buttons[4]['title'] = ucfirst($txt->getWord('my_searches'));
		$buttons[4]['href'] = '/c/'.$com->getComId().'?list=search';
		*/
		$buttons[4]['title'] = ucfirst($txt->getWord('saved_search'));
		$buttons[4]['href'] = '/c/'.$com->getComId().'/?list=search';
		$buttons[4]['params']['class'] = $buttons[0]['params']['class'];
		
		$buttons[5]['title'] = ucfirst($txt->getWord('logout'));
		$buttons[5]['href'] = '/c/'.$com->getComId().'/?action=logout';
		$buttons[5]['params']['class'] = $buttons[0]['params']['class'];
	}
	
	if($_GET['edit'] == 'ad')
	{ $buttons[2]['params']['class'] = 'btn btn-primary btn-inverse'; }
	else if($_GET['list'] == 'ad')
	{ $buttons[1]['params']['class'] = 'btn btn-primary btn-inverse'; }
	else if($_GET['list'] == 'bookmark')
	{ $buttons[3]['params']['class'] = 'btn btn-primary btn-inverse'; }
	else if($_GET['list'] == 'search')
	{ $buttons[4]['params']['class'] = 'btn btn-primary btn-inverse'; }
	else
	{ $buttons[0]['params']['class'] = 'btn btn-primary btn-inverse'; }
	
	$com->setButtonsHeader($buttons);
	unset($buttons);
	/*
	if($_GET['list'] == 'ad')
	{ $text3 =  ' / '.ucfirst($txt->getWord('my_ads')); }
	if($_GET['edit'] == 'ad')
	{ $text3 =  ' / '.ucfirst($txt->getWord('ad')); }
	*/
	require_once('components/common/com_top.php');
	if($controller->getEditor() != '')
	{
		if(is_file($controller->getEditor()))
		{ require_once($controller->getEditor()); }
	}
	require_once('components/common/com_bot.php');
}
?>
